﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;

namespace V5_PhoneLibs.Core {
    public class UrlHelper {

        private static readonly UrlHelper m_Instance = new UrlHelper();
        /// <summary>
        /// 
        /// </summary>
        public static UrlHelper Instance {
            get { return m_Instance; }
        }
        /// <summary>
        /// 导航页面
        /// </summary>
        /// <param name="page"></param>
        /// <param name="Url"></param>
        /// <returns></returns>
        public bool Action(PhoneApplicationPage page, string Url) {
            var nav = page.NavigationService;
            return nav.Navigate(new Uri(Url, UriKind.RelativeOrAbsolute));
        }
    }
}
